<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>支付成功</title>
  <style>
    .bT{
      width: 322px;
      line-height: 55px;
      height: 60px;
      font-size: 20px;;
      background-color: transparent;
      outline: none;;
      cursor: pointer;
	  border:2px solid #d2e0ff;
	  border-radius: 50px;
	  font-size: 26px;
	  color: #5887ef;
	  bottom:-330px !important;
    }
    .bT:hover{
      background-color: #5887ef;
	  border-color: #5887ef;
	  color: white;
    }
	.mainVi{
		height:404px ;width: 569px;bottom: 220px !important;
	}
	.goF{
		position: fixed;
		 top:0;bottom: 0; left: 0; right:0; margin: auto;overflow: hidden;
		 outline: none;;
	}
	.mainVi>div{
		text-align: center;
		height: 100%;
		width: 100%;
		color: #999;
		font-size: 22px;
		line-height: 1.7;
	}
	
  </style>
</head>
<body>
  <div>

    <div class="goF mainVi" style="">
		<div id="J1" style="background: url('./static/img/zf-1.jpg') center no-repeat; display: none;">
			<div style="padding-top: 160px;">
				<div >充值成功</div>
				<div style="color:#5887ef;">¥<span id="money" style="font-size: 50px;  margin-left: 10px;">0</span></div>
				<div>赠送猫币</div>
				<div>
					<img src="./static/img/zf-0.jpg" style="display: inline-block;position: relative;;top:2px;">
					<span id="currency">0</span>
				</div>
			</div>
			
		</div>
		<div id="J2" style="background: url('./static/img/zf-2.jpg') center no-repeat;display: none;"></div>
		
      <!-- <div style="width: 55%; margin: 10% auto; line-height:1.8; font-size: 16px;">
        
      </div> -->
    </div>
	
	<button type="button" onclick="closeWindow()" class="bT goF ">点击返回</button>
    
    
  </div>
  <script>

    var alipayUrl=sessionStorage.getItem('alipayUrl');
    var alipayMoney=sessionStorage.getItem('alipayMoney');
	var alipayType=sessionStorage.getItem('alipayType');//1充值，2单笔支付
	
    var bigSetting=JSON.parse(sessionStorage.getItem('bigSetting'));
    var money=0;
    var currency=0;
	
	if(!!bigSetting){
		(bigSetting.recharge).forEach(function(val,i){
		  if(val.money==alipayMoney){
		    money=val.money;
		    currency=val.currency;
		  }
		});
	}
	
	if(alipayType==1){
		var jDom=document.getElementById('J1');
		jDom.style.display="block";//显示节点
	}else if(alipayType==2){
		var jDom=document.getElementById('J2');
		jDom.style.display="block";//显示节点
	}
	
	
    

    // 赋值
    document.getElementById('money').innerHTML=money;
    document.getElementById('currency').innerHTML=currency;
	
	
	
    // 关闭本窗口
    function closeWindow(){
		
		// 删除本地存储
		window.sessionStorage.removeItem('alipayUrl');
		window.sessionStorage.removeItem('alipayMoney');
		window.sessionStorage.removeItem('alipayType');
		
		if(!!alipayUrl){
			location.replace(JSON.parse(alipayUrl));
		}else{
			location.replace('https://www.fuwumao.cn/index');
		}
    }

  </script>
</body>
</html>